package com.xubeizhi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xubeizhi.entity.User;
import com.xubeizhi.vo.SystemUserVO;
import com.xubeizhi.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 系统管理-用户基础信息表Mapper接口
 * @author mi
 * @create 2023/3/2 15:41
 */
@Repository
@Mapper
public interface UserMapper extends BaseMapper<User> {

    void insertBackId(User user);

    List<Integer> getMenuId(Integer userId);

    Page<UserVO> selectPageRecord(@Param("page")Page<UserVO> page,@Param("username")String username,@Param("loginType")Integer loginType);

    SystemUserVO getById(Object id);

    User selectNameAndPassword(@Param("username")String username,@Param("password")String password);

    void updateLoginInfo(@Param("loginId")Object loginId,@Param("ip")String ip,@Param("cityInfo")String cityInfo,
                         @Param("os")String os,@Param("browser")String browser);
}
